<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<script type="text/javascript">

alert(encodeURIComponent('http://www.baidu.com'));

console.log(encodeURIComponent("http://wq.guanaichou.cn/APP/testWechat.html"));

</script>
</head>
<body>

</body>
</html>